/* 元素显示与否 */
.block {
  display: block !important;
}
.none {
  display: block !important;
}
.inline-block {
  display: inline-block !important;
}
/* 定位 */
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
/* 没有内边距 */
.no-padding {
  padding: 0px !important;
}
/* 没有边 */
.no-border {
  border: none !important;
}
/* 手形 */
.pointer {
  cursor: pointer !important;
}
/* 对齐方式 */
.align-left {
  text-align: left !important;
}
.align-center {
  text-align: center !important;
}
.align-right {
  text-align: right !important;
}

.border-radius {
  border-radius: 50% !important;
}

/* 单行省略 */
.ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 两行省略 */
.ellipsis2 {
  text-overflow: -o-ellipsis-lastline;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}

.fl {
  float: left;
}

.fr {
  float: right;
}
/* 清除浮动 */
.clear {
  clear: both;
}

.clearfix::after {
  display: block;
  clear: both;
  visibility: hidden;
  height: 0;
  content: '';
}

.fixed-center {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
}

.overflow {
  overflow: hidden;
}

.vh-100 {
  height: 100vh;
}

img {
  max-width: 100%;
}

// 字体大小
@fontsize: {
  12: 12px;
  14: 14px;
  16: 16px;
  18: 18px;
  20: 20px;
};

each(@fontsize, {
  .size-@{key} {
    font-size: @value;
  }
}) 

// 外边距
.loop(@counter) when (@counter > 0) {
  .loop((@counter - 1)); // next iteration
  @c: @counter * 5;
  .margin-left-@{c} {
    margin-left: (@counter * 5px);
  }
  .margin-top-@{c} {
    margin-top: (@counter * 5px);
  }
  .margin-right-@{c} {
    margin-right: (@counter * 5px);
  }
  .margin-bottom-@{c} {
    margin-bottom: (@counter * 5px);
  }
}
.loop(10); // launch the loop
